/**
 * 
 */
package lt.vin.exaatto.client.events;

import com.google.gwt.event.shared.GwtEvent;

/**
 * @author Vincentas
 *
 */
public class ElementSelectedEvent<T> extends GwtEvent<ElementSelectedHandler> {

	private final T element;
	
	public ElementSelectedEvent(T element) {
		this.element = element;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ElementSelectedHandler> getAssociatedType() {
		return ElementSelectedHandler.type;
	}

	@Override
	protected void dispatch(ElementSelectedHandler handler) {
		handler.selectedElement(element);		
	}

}
